<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>  
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
</head>
<body>
	<div>
		<input type="button" id="test" value="测试" />
	</div>
<script>
	$(function(){
		$('#test').click(function(){
			$.ajax({
                type: "POST",
                url: "testt1.json",
                data: {},
                timeout: 5000,  //30分钟的超时时间
                async: false,
                success: function(opResult){
                	alert(opResult)
                },
                error:function (XMLHttpRequest, textStatus, errorThrown) {
                	alert('error')
                	/*alert(XMLHttpRequest.status);
                	alert(XMLHttpRequest.readyState);
                	alert(textStatus);
                	alert('操作失败');*/
                }
            });
		})
	})
</script>
</body>
</html>